/*
* name;
*/
import Handler = Laya.Handler;

module ui.role1{

    export class RoleDlg extends ui.role.RoleDlgUIUI{
    
    _panelLayer:Sprite;

    constructor(panelLayer:Sprite){

        super();
        this._panelLayer = panelLayer;
    }

    animatingShow():void {

        this._panelLayer.addChild(this);
        // Laya.Tween.from(this, { alpha: 0.8, x: Laya.stage.height }, 800, Laya.Ease.linearNone, new Handler(this,this.animationShowComplete));
        this.animationShowComplete();
    }

    animatingClose(): void {

        // Laya.Tween.to(this, { x: Laya.stage.width }, 400, Laya.Ease.linearNone, new Handler(this,this.animationCloseComplete));
        this.animationCloseComplete();
    }

    animationShowComplete():void{
        // this.x = (Laya.stage.width - this.width) / 2;
        // this.y = (Laya.stage.height - this.height) / 2;
        // this.top = this.bottom = this.left = this.right = 0;
    }

    animationCloseComplete():void{

        this.x = 0;
        this.y = 0;
        if(this.parent != null){

            this.parent.removeChild(this);
        }
    }
}

}